package org.bees.cms.common;

public class Classes {

	public static boolean hasImplemented(Class<?> clazz, Class<?> interfase) {
		Class<?>[] classes = clazz.getInterfaces();
		for (Class<?> temp : classes) {
			if (temp == interfase) {
				return true;
			}
		}
		if (clazz != Object.class) {
			return hasImplemented(clazz.getSuperclass(), interfase);
		}
		return false;
	}

}
